var app = getApp();
var httpUtils = require('../../utils/httpUtils.js');

Page({
  data: {
    totalAmount: '',
    billList: []
  },
  onLoad: function() {

    var _this = this;
    var url = app.globalData.interfaceUrl + '/worker.do?method=getWaitBillInfo';
    console.log(url);
    httpUtils.post(url, {}, function(res) {
      var billTotal = res.data.data.totalAmount;
      var billList = res.data.data.billList;
      console.log(billList);
      _this.setData({
        totalAmount: billTotal,
        billList: billList
      });
    });

  },
  jumpOrderDetail:function(e){
    var order_id = e.currentTarget.dataset.order_id;
    wx.navigateTo({
      url: '../orderInPrograss/orderInPrograss?order_id=' + order_id,
    })
  }
})